package design_6_adapter.demo1.controller;


import design_6_adapter.demo1.config.annotation.RequestMapping;
import design_6_adapter.demo1.config.annotation.RestController;

/**
 * 模拟使用 注解配置的 controller 接口
 */
@RestController
public class TestAnnotationAdapterController {

	/**
	 * 模拟Id 查询
	 */
	@RequestMapping("/annotation/findId")
	public String findId() {
		return "{\n" +
				"\"id\":\"1\",\n" +
				"\"name\":\"注解适配器 测试查询1\",\n" +
				"\"age\":\"22\"\n" +
				"}";
	}


	/**
	 * 模拟Id 查询
	 */
	@RequestMapping("/annotation/findId2")
	public String findId2() {
		return "{\n" +
				"\"id\":\"1\",\n" +
				"\"name\":\"注解适配器 测试查询2\",\n" +
				"\"age\":\"22\"\n" +
				"}";
	}
}
